<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        div {
            margin: 300px auto;
            position: relative;
            width: 100px;
            height: 200px;
        }
        p {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: pink;
            /* 给旋转属性加个过渡  谁做动画给谁加 */
            /* 这个旋转属性 慢慢的变化 */
            transition: transform 2s;
            /* 改变p旋转中心 */
            transform-origin: right top;
        }
        /* 鼠标经过 下面的p孩子发生旋转 */
        div:hover p:nth-child(1) {
            transform: rotate(60deg);
        }
        div:hover p:nth-child(2) {
            transform: rotate(120deg);
        }
        div:hover p:nth-child(3) {
            transform: rotate(180deg);
        }
        div:hover p:nth-child(4) {
            transform: rotate(240deg);
        }
        div:hover p:nth-child(5) {
            transform: rotate(300deg);
        }
        div:hover p:nth-child(6) {
            transform: rotate(360deg);
        }
        
    </style>
</head>
<body>
    <div>
        <p></p>
        <p></p>
        <p></p>
        <p></p>
        <p></p>
        <p></p>
    </div>
 
    
</body>
</html>